using System.Collections.Generic;

public class Table_SceneClassItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 名称
    /// <summary>
    public string Name { get; private set; }
    /// <summary>
    /// 场景图片
    /// <summary>
    public string SceneImg { get; private set; }
    /// <summary>
    /// 场景图集
    /// <summary>
    public string SceneAtlas { get; private set; }
    /// <summary>
    /// 场景资源
    /// <summary>
    public string SceneName { get; private set; }
    /// <summary>
    /// 资源名称
    /// <summary>
    public string ResName { get; private set; }
    /// <summary>
    /// 副本类型
    /// <summary>
    public int SceneType { get; private set; }
    /// <summary>
    /// 地表高度最大值
    /// <summary>
    public int TerrainHeightMax { get; private set; }
    /// <summary>
    /// 地表场景大小
    /// <summary>
    public string MapSize { get; private set; }
    /// <summary>
    /// 地表高度图大小
    /// <summary>
    public string TerrainMap { get; private set; }
    /// <summary>
    /// 雷达图片大小
    /// <summary>
    public string SceneMap { get; private set; }
    /// <summary>
    /// 雷达地图资源
    /// <summary>
    public string SceneMapTexture { get; private set; }
    /// <summary>
    /// 入口坐标
    /// <summary>
    public string Entry_Pos { get; private set; }
    /// <summary>
    /// 安全坐标
    /// <summary>
    public string Safe__Pos { get; private set; }
    /// <summary>
    /// 背景音乐ID
    /// <summary>
    public int BGMusic { get; private set; }
    /// <summary>
    /// 界面ID
    /// <summary>
    public int GetPanelIdCount() { return PanelId.Count; }
    private List<int> PanelId = new List<int>();
    public int GetPanelIdbyIndex(int idx)
    {
        return PanelId.GetValueByIdx(idx, 0);
    }

    public Table_SceneClassItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        Name = reader.ReadString();
        SceneImg = reader.ReadString();
        SceneAtlas = reader.ReadString();
        SceneName = reader.ReadString();
        ResName = reader.ReadString();
        SceneType = reader.ReadInt();
        TerrainHeightMax = reader.ReadInt();
        MapSize = reader.ReadString();
        TerrainMap = reader.ReadString();
        SceneMap = reader.ReadString();
        SceneMapTexture = reader.ReadString();
        Entry_Pos = reader.ReadString();
        Safe__Pos = reader.ReadString();
        BGMusic = reader.ReadInt();
        PanelId = reader.ReadShortString().ToIntList(";");
    }
}

public class Table_SceneClassMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/SceneClass.txt"; } }

    protected List<Table_SceneClassItem> mItemList = new List<Table_SceneClassItem>();
    public Table_SceneClassItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_SceneClassItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_SceneClassItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}